package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.DeletedLeadDaoImpl;
import com.asset.salesforce.domain.DeletedLead;

@Service
@Transactional(readOnly=true)
public class DeletedLeadService {

	@Autowired 
	private DeletedLeadDaoImpl deletedLeadDaoImpl;
	
	@Transactional(readOnly=false)
	public DeletedLead addDeletedLead(DeletedLead deletedLead) {
		 deletedLeadDaoImpl.add(deletedLead);
		 return deletedLead;
	}
	public DeletedLead getById(DeletedLead deletedLead) {
		return deletedLeadDaoImpl.getById(deletedLead.getId(), new DeletedLead());
	}
	
	public List<DeletedLead> getAll() {
		return deletedLeadDaoImpl.getAll(new DeletedLead());
	}
}
